package com.share.homestay.controller;

import com.share.homestay.entity.HostelOrders;
import com.share.homestay.entity.OrderOperationLogs;
import com.share.homestay.interfaces.HostelOrdersServiceApi;
import com.share.homestay.pojo.JsonResult;
import com.share.homestay.service.HostelOrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HostelOrdersController implements HostelOrdersServiceApi {

    @Autowired
    private HostelOrdersService hostelOrdersService;
    @Override
    public JsonResult findAllHostelOrders(HostelOrders hostelOrders, Long pageNum, Long pageSize) {
        return hostelOrdersService.findAllHostelOrders(hostelOrders,pageNum,pageSize);
    }

    @Override
    public JsonResult findOrderOperationLogs(String id, Long pageNum, Long pageSize) {
        return hostelOrdersService.findOrderOperationLogs(id,pageNum,pageSize);
    }

    @Override
    public Long addOrderOperationLog(OrderOperationLogs orderOperationLogs) {
        return hostelOrdersService.addOrderOperationLog(orderOperationLogs);
    }
}
